using System;
using System.Collections.Generic;
using System.Text;

using NHibernate;
using NHibernate.Data.Models;
using NHibernate.Data.Base;

namespace NHibernate.Data.Managers
{
    public partial interface IWineManager : IManagerBase<Wine, long>
    {
		// Get Methods
		IList<Wine> GetByAdditionalInformation(System.Int64 additionalInformation);
		IList<Wine> GetByBrand(System.Int64 brand);
		IList<Wine> GetByClassification(System.Int64 classification);
		IList<Wine> GetByClosureType(System.Int64 closureType);
		IList<Wine> GetByDescription(System.Int64 description);
		IList<Wine> GetByGeneralAgentInMainlandChina(System.Int64 generalAgentInMainlandChina);
		IList<Wine> GetByLocalName(System.Int64 localName);
		IList<Wine> GetByMakerComment(System.Int64 makerComment);
		IList<Wine> GetByOakAging(System.Int64 oakAging);
		IList<Wine> GetByOriginCountry(System.Int64 originCountry);
		IList<Wine> GetByRegionA(System.Int64 regionA);
		IList<Wine> GetByRegionB(System.Int64 regionB);
		IList<Wine> GetByRegionC(System.Int64 regionC);
		IList<Wine> GetBySupplier(System.Int64 supplier);
		IList<Wine> GetByTypeByColor(System.Int64 typeByColor);
		IList<Wine> GetByTypeBySugar(System.Int64 typeBySugar);
		IList<Wine> GetByWinery(System.Int64 winery);
		IList<Wine> GetByWineTypeByVinification(System.Int64 wineTypeByVinification);
    }

    partial class WineManager : ManagerBase<Wine, long>, IWineManager
    {
		#region Constructors
		
		public WineManager() : base()
        {
        }
        public WineManager(INHibernateSession session) : base(session)
        {
        }
		
		#endregion
		
        #region Get Methods

		
		public IList<Wine> GetByAdditionalInformation(System.Int64 additionalInformation)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(Wine));
			
			criteria.Add(NHibernate.Criterion.Expression.Eq("AdditionalInformation", additionalInformation));
			
			return criteria.List<Wine>();
        }
		
		public IList<Wine> GetByBrand(System.Int64 brand)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(Wine));
			
			criteria.Add(NHibernate.Criterion.Expression.Eq("Brand", brand));
			
			return criteria.List<Wine>();
        }
		
		public IList<Wine> GetByClassification(System.Int64 classification)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(Wine));
			
			criteria.Add(NHibernate.Criterion.Expression.Eq("Classification", classification));
			
			return criteria.List<Wine>();
        }
		
		public IList<Wine> GetByClosureType(System.Int64 closureType)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(Wine));
			
			criteria.Add(NHibernate.Criterion.Expression.Eq("ClosureType", closureType));
			
			return criteria.List<Wine>();
        }
		
		public IList<Wine> GetByDescription(System.Int64 description)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(Wine));
			
			criteria.Add(NHibernate.Criterion.Expression.Eq("Description", description));
			
			return criteria.List<Wine>();
        }
		
		public IList<Wine> GetByGeneralAgentInMainlandChina(System.Int64 generalAgentInMainlandChina)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(Wine));
			
			criteria.Add(NHibernate.Criterion.Expression.Eq("GeneralAgentInMainlandChina", generalAgentInMainlandChina));
			
			return criteria.List<Wine>();
        }
		
		public IList<Wine> GetByLocalName(System.Int64 localName)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(Wine));
			
			criteria.Add(NHibernate.Criterion.Expression.Eq("LocalName", localName));
			
			return criteria.List<Wine>();
        }
		
		public IList<Wine> GetByMakerComment(System.Int64 makerComment)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(Wine));
			
			criteria.Add(NHibernate.Criterion.Expression.Eq("MakerComment", makerComment));
			
			return criteria.List<Wine>();
        }
		
		public IList<Wine> GetByOakAging(System.Int64 oakAging)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(Wine));
			
			criteria.Add(NHibernate.Criterion.Expression.Eq("OakAging", oakAging));
			
			return criteria.List<Wine>();
        }
		
		public IList<Wine> GetByOriginCountry(System.Int64 originCountry)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(Wine));
			
			criteria.Add(NHibernate.Criterion.Expression.Eq("OriginCountry", originCountry));
			
			return criteria.List<Wine>();
        }
		
		public IList<Wine> GetByRegionA(System.Int64 regionA)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(Wine));
			
			criteria.Add(NHibernate.Criterion.Expression.Eq("RegionA", regionA));
			
			return criteria.List<Wine>();
        }
		
		public IList<Wine> GetByRegionB(System.Int64 regionB)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(Wine));
			
			criteria.Add(NHibernate.Criterion.Expression.Eq("RegionB", regionB));
			
			return criteria.List<Wine>();
        }
		
		public IList<Wine> GetByRegionC(System.Int64 regionC)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(Wine));
			
			criteria.Add(NHibernate.Criterion.Expression.Eq("RegionC", regionC));
			
			return criteria.List<Wine>();
        }
		
		public IList<Wine> GetBySupplier(System.Int64 supplier)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(Wine));
			
			criteria.Add(NHibernate.Criterion.Expression.Eq("Supplier", supplier));
			
			return criteria.List<Wine>();
        }
		
		public IList<Wine> GetByTypeByColor(System.Int64 typeByColor)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(Wine));
			
			criteria.Add(NHibernate.Criterion.Expression.Eq("TypeByColor", typeByColor));
			
			return criteria.List<Wine>();
        }
		
		public IList<Wine> GetByTypeBySugar(System.Int64 typeBySugar)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(Wine));
			
			criteria.Add(NHibernate.Criterion.Expression.Eq("TypeBySugar", typeBySugar));
			
			return criteria.List<Wine>();
        }
		
		public IList<Wine> GetByWinery(System.Int64 winery)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(Wine));
			
			criteria.Add(NHibernate.Criterion.Expression.Eq("Winery", winery));
			
			return criteria.List<Wine>();
        }
		
		public IList<Wine> GetByWineTypeByVinification(System.Int64 wineTypeByVinification)
        {
            ICriteria criteria = Session.GetISession().CreateCriteria(typeof(Wine));
			
			criteria.Add(NHibernate.Criterion.Expression.Eq("WineTypeByVinification", wineTypeByVinification));
			
			return criteria.List<Wine>();
        }
		
		#endregion
    }
}